package cn.geoportal.benoserver.entity;

import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 入库任务表
 * @TableName t_shpload_task
 */
@TableName(value ="t_shpload_task")
@Data
public class ShploadTask implements Serializable {
    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JSONField(ordinal = 0)
    @ApiModelProperty(value = "id", required = false, hidden = true)
    private Integer id;

    /**
     * 入库任务名称
     */
    @TableField(value = "name")
    @JSONField(ordinal = 1)
    @ApiModelProperty(value = "name", position = 1)
    private String name;

    /**
     * 入库任务描述
     */
    @TableField(value = "description")
    @JSONField(ordinal = 2)
    @ApiModelProperty(value = "description", position = 2)
    private String description;

    /**
     * 空间数据库
     */
    @TableField(value = "dbid")
    @JSONField(ordinal = 3)
    @ApiModelProperty(value = "dbid", position = 3)
    private Integer dbid;

    @ApiModelProperty(value = "转换任务类型", hidden = true)
    @JSONField(ordinal = 4)
    @TableField(exist = false)
    @ExcelEntity(name = "转换任务类型")
    private String dbname;

    /**
     * Shapfile数据源
     */
    @TableField(value = "shpfile")
    @JSONField(ordinal = 5)
    @ApiModelProperty(value = "dbid", position = 5)
    private String shpfile;

    /**
     * EPSG
     */
    @TableField(value = "epsg")
    @JSONField(ordinal = 6)
    @ApiModelProperty(value = "epsg", position = 6)
    private String epsg;

    /**
     * 数据新建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JSONField(ordinal = 7)
    @ApiModelProperty(value = "创建时间", required = false, hidden = true)
    private Date createdat;

    /**
     * 数据更新时间
     */
    @TableField(value = "updatedat", fill = FieldFill.INSERT_UPDATE)
    @JSONField(ordinal = 8)
    @ApiModelProperty(value = "更新时间", required = false, hidden = true)
    private Date updatedat;

    /**
     * 状态
     */
    @TableField(value = "status", fill = FieldFill.INSERT_UPDATE)
    @JSONField(ordinal = 8)
    @ApiModelProperty(value = "状态", required = false, hidden = true)
    private String status;

    /**
     * 状态名称
     */
    @JSONField(ordinal = 9)
    @ApiModelProperty(value = "状态名称", required = false, hidden = true)
    private String statusName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}